package vista;
import com.cloudgarden.layout.AnchorConstraint;
import com.cloudgarden.layout.AnchorLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.LayoutStyle;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.LineBorder;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class MenuPrincipal extends javax.swing.JFrame {
	private JPanel panPrincipal;
	private JButton btnOrden;
	private JButton btnProducto;
	private JLabel jLabel4;
	private JButton btnReportes;
	private JButton btnCategoria;
	private JButton btnIngredientes;
	private JLabel jLabel3;
	private JLabel jLabel2;
	private JLabel jLabel1;
	private JLabel lblMenuPrincipal;
	private JLabel lblIngrediente;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	public MenuPrincipal() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			
			
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			//this.setIconImage(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/Diapositiva1.JPG")).getImage());
			getContentPane().setBackground(new java.awt.Color(0,0,0));
			getContentPane().setLayout(null);
			{
				panPrincipal = new JPanel();
				getContentPane().add(panPrincipal);
				panPrincipal.setLayout(null);
				panPrincipal.setBackground(new java.awt.Color(150,182,35));
				panPrincipal.setBounds(8, 80, 434, 229);
				panPrincipal.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				{
					btnOrden = new JButton();
					panPrincipal.add(btnOrden, "Center");
					btnOrden.setLayout(null);
					btnOrden.setBounds(116, 11, 68, 64);
					btnOrden.setFont(new java.awt.Font("Purisa",0,12));
					btnOrden.setBackground(new java.awt.Color(150,182,35));
					btnOrden.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnOrden.setOpaque(false);
					btnOrden.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/Pedido.jpg")));
					btnOrden.setActionCommand("Orden");
				}
				{
					lblIngrediente = new JLabel();
					panPrincipal.add(lblIngrediente);
					lblIngrediente.setText("Ingredientes");
					lblIngrediente.setBounds(31, 172, 104, 29);
					lblIngrediente.setFont(new java.awt.Font("Purisa",0,14));
					lblIngrediente.setBackground(new java.awt.Color(255,255,255));
					lblIngrediente.setForeground(new java.awt.Color(0,0,0));
				}
				{
					jLabel1 = new JLabel();
					panPrincipal.add(jLabel1);
					jLabel1.setText(" Categoria");
					jLabel1.setFont(new java.awt.Font("Purisa",0,14));
					jLabel1.setForeground(new java.awt.Color(0,0,0));
					jLabel1.setBackground(new java.awt.Color(255,255,255));
					jLabel1.setBounds(310, 172, 91, 29);
				}
				{
					jLabel2 = new JLabel();
					panPrincipal.add(jLabel2);
					jLabel2.setText(" Producto");
					jLabel2.setFont(new java.awt.Font("Purisa",0,14));
					jLabel2.setForeground(new java.awt.Color(0,0,0));
					jLabel2.setBackground(new java.awt.Color(255,255,255));
					jLabel2.setBounds(245, 71, 98, 29);
				}
				{
					jLabel3 = new JLabel();
					panPrincipal.add(jLabel3);
					jLabel3.setText("Orden");
					jLabel3.setFont(new java.awt.Font("Purisa",0,14));
					jLabel3.setForeground(new java.awt.Color(0,0,0));
					jLabel3.setBackground(new java.awt.Color(255,255,255));
					jLabel3.setBounds(128, 73, 78, 29);
				}
				{
					btnProducto = new JButton();
					panPrincipal.add(btnProducto, "Center");
					btnProducto.setLayout(null);
					btnProducto.setFont(new java.awt.Font("Purisa",0,12));
					btnProducto.setBackground(new java.awt.Color(255,255,255));
					btnProducto.setOpaque(false);
					btnProducto.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnProducto.setBounds(245, 10, 76, 65);
					btnProducto.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/Productos.jpg")));
					btnProducto.setActionCommand("Producto");
				}
				{
					btnIngredientes = new JButton();
					panPrincipal.add(btnIngredientes);
					btnIngredientes.setLayout(null);
					btnIngredientes.setFont(new java.awt.Font("Purisa",0,12));
					btnIngredientes.setBackground(new java.awt.Color(255,255,255));
					btnIngredientes.setOpaque(false);
					btnIngredientes.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnIngredientes.setBounds(43, 109, 73, 67);
					btnIngredientes.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/Ingredientea.jpg")));
					btnIngredientes.setActionCommand("Ingredientes");

				}
				{
					btnCategoria = new JButton();
					panPrincipal.add(btnCategoria, "Center");
					btnCategoria.setLayout(null);
					btnCategoria.setFont(new java.awt.Font("Purisa",0,12));
					btnCategoria.setBackground(new java.awt.Color(150,182,35));
					btnCategoria.setOpaque(false);
					btnCategoria.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnCategoria.setBounds(310, 114, 78, 62);
					btnCategoria.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/Categoria.jpg")));
					btnCategoria.setActionCommand("Categoria");
				}
				{
					btnReportes = new JButton();
					panPrincipal.add(btnReportes);
					btnReportes.setBounds(186, 109, 74, 66);
					btnReportes.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
					btnReportes.setOpaque(false);
					btnReportes.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/reportes.jpg")));
					btnReportes.setActionCommand("Reportes");
				}
				{
					jLabel4 = new JLabel();
					panPrincipal.add(jLabel4);
					jLabel4.setText(" Reportes");
					jLabel4.setBounds(174, 178, 91, 14);
					jLabel4.setFont(new java.awt.Font("Purisa",0,14));
				}
			}
			{
				lblMenuPrincipal = new JLabel();
				getContentPane().add(lblMenuPrincipal);
				lblMenuPrincipal.setText("Menú");
				lblMenuPrincipal.setBounds(79, 3, 236, 72);
				lblMenuPrincipal.setFont(new java.awt.Font("Purisa",1,48));
				lblMenuPrincipal.setBackground(new java.awt.Color(255,255,255));
				lblMenuPrincipal.setForeground(new java.awt.Color(255,255,255));
				lblMenuPrincipal.setIcon(new ImageIcon(getClass().getClassLoader().getResource("Imagenes/homeblack2.jpg")));
			}
			pack();
			this.setSize(459, 357);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public void addListener(ActionListener actionListener) {
		this.btnOrden.addActionListener(actionListener);
		this.btnProducto.addActionListener(actionListener);
		this.btnCategoria.addActionListener(actionListener);
		this.btnReportes.addActionListener(actionListener);
		this.btnIngredientes.addActionListener(actionListener);
	}
	
	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}

}
